/**
 * Created by Administrator on 2015/5/25.
 */

angular.module('starter')
    .controller('VoteController',function ($scope,ResourceVisitService,VoteService,$stateParams,VoteService ){
        var voteTypeId = $stateParams.voteTypeId;
        $scope.voteType = VoteService.findVoteType(voteTypeId);

        var userName = VoteService.getUserName();
        $scope.voteDefineList= [];
        VoteService.init(voteTypeId,$scope.voteDefineList);
        $scope.choice=function(){
            VoteService.choice(voteTypeId)   ;
        }
    });